Verify if two objects have equal attributes including OLE

I would like to compare two objects that are in different modules to check if they are the same.

Essentially they should have the same attributes and the same values for those attributes(including OLE, tables, links, etc.. in case there any) except for Absolute Number and Object Identifier.

 

I already created a Skip with the attributes that I want to compare, but I don't know how to compare them.

I would also like to copy these attributes (with OLE, tables, links, etc..) to this second object in care they are different.


camba - Mon Oct 03 12:55:43 EDT 2016

Re: Verify if two objects have equal attributes including OLE
Mathias Mamsch - Tue Oct 04 03:50:18 EDT 2016

Comparing OLE objects in DOORS is tricky, since they have a few "random" bytes, which are different each time DOORS loads the Item over the Windows OLE Api. Therefore when you compare attribute values, you will likely get a difference if the Object contains an OLE object. To compare to attribute values, you can use a simple buffer comparison, e.g. 

Buffer bufOld = create(); bufOld = richTextWithOle o1."Attribute"; 
Buffer bufNew = create(); bufNew = richTextWithOle o2."Attribute"; 

if (bufOld == bufNew) {
    // same
} else {
    // different
}
delete bufOld; delete bufNew;

Look on the forum for my old post on OLE comparison. I posted some code on how to compare OLE objects in the past. Hope this helps, regards, Mathias